-
Notifications
You must be signed in to change notification settings - Fork 533
Memoize version check #2274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memoize version check #2274
Conversation
@effigies - should we use memoize here, or just call the version check again? in the unlikely, but possible scenario that someone changes a software on the system. |
The specific purpose is to memoize so that when calling an interface many times that runs a version check under the hood, we're not spawning an additional process each time. Under what circumstances would you want to actively support changing versions during a run, and is it worth accounting for that situation by default? Most of the effects are going to be for input spec versioning, which will happen at workflow construction time. If you swap in an incompatible version after that, it should break when it's time to run. But significantly changing the environment is one of those cases where I feel like breaking is both expected and probably a good alternative to silently pressing on. The one case I can see is if you're working in a Python console, and upgrade software, and for whatever reason you really don't want to start a new console. With this change, you could do |
Codecov Report
@@ Coverage Diff @@
## master #2274 +/- ##
==========================================
+ Coverage 72.5% 72.52% +0.01%
==========================================
Files 1188 1188
Lines 59134 59135 +1
Branches 8505 8506 +1
==========================================
+ Hits 42877 42889 +12
+ Misses 14871 14860 -11
Partials 1386 1386
Continue to review full report at Codecov.
|
@effigies - i'll merge this in a second. the situation really deals with environment where people have long running jobs, but underlying software can get updated without people knowing. while this is not common, as i mentioned earlier, i think with versioning, just like file hashing we cannot rely on the external environment to remain constant. |
Same as in nipy#2274, but for FSL
Fixes #2273.
Changes proposed in this pull request
PackageInfo
template that reads version information from a file or command output, passes to a subclass-defined parser, and stores the result for future calls